## Figure 1 ##
library(readxl)
conf <- read_excel("confidence.xlsx")
library(ggplot2)
library(reshape2)
data_long <- melt(conf, id.vars = "date")
data_long$value <- data_long$value*100
ggplot(data_long,                            # Draw ggplot2 time series plot
       aes(x = date,
           y = value)) +
  geom_line(aes(linetype=variable), size=1.5) +
  xlab("Year") +
  ylab("Percentage (%)") +
  scale_linetype_manual(labels = c("Confident", "Not Confident", "Net Value"), values = c("dashed","dotted","solid")) +
  theme(
    axis.text = element_text(size = 25),
    axis.title = element_text(size = 28),
    legend.title = element_blank(),
    legend.text = element_text(size = 30),
    legend.position = "top",
    legend.key.width = unit(1.8, "cm"),
    legend.spacing.x = unit(1.1, "cm")
  )
